package com.dodoke.ojserver.bean.dto;

import com.dodoke.ojserver.bean.valid.UserValidGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@ApiModel(description = "用户登录实体类")
@Data
public class UsersDTO {

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名", required = true)
    @NotNull(message = "用户名不能为空", groups = { UserValidGroups.Add.class, UserValidGroups.Edit.class })
    private String username;

    /**
     * 用户密码
     */
    @ApiModelProperty(value = "用户名", required = true)
    @NotNull(message = "密码不能为空", groups = { UserValidGroups.Add.class, UserValidGroups.Edit.class })
    private String password;

}
